import request from '@/utils/request.js'

// 根据dictType获取字典项
export const dictDataApi = (params) => request({ url: `/web/dictData/list`, method: 'get', params })

// 查询banner管理列表
export const getBannerApi = (params) => request({ url: `/web/banner/getInfoByBannerModel`, method: 'get', params })

// 查询客户端用户列表
export const customerListApi = (params) => request({ url: `/web/customer/list`, method: 'get', params })

// 单个文件上传
export const upload = (data) => request({ url: `/file/upload`, method: 'post', data, headers: { 'Content-Type': 'multipart/form-data' }, loading: true })

// 多个文件上传
export const uploads = (data) => request({ url: `/file/uploads`, method: 'post', data, headers: { 'Content-Type': 'multipart/form-data' }, loading: true })

// 添加可查看人员
export const dealCanViewPersonApi = (data) => request({ url: `/web/cooperation/dealCanViewPerson`, method: 'post', data })

// 查负责人列表
export const queryCooperstionApi = (data) => request({ url: `/web/cooperation/queryCooperstion`, method: 'post', data })

// 负责人添加
export const dealResponsiblePersonApi = (data) => request({ url: `/web/cooperation/dealResponsiblePerson`, method: 'post', data, loading: true })

// 查询修船厂
export const listRepairYardApi = (params, data) => request({ url: `/web/enterprise/listRepairYard`, method: 'post', params, data, loading: false })

// 采购/外协 服务商列表
export const listPurchaserApi = (params, data) => request({ url: `/web/enterprise/listEnterpriseByClass`, method: 'post', params, data, loading: false })

// 查询国家列表(不分页)
export const countryListApi = (params) => request({ url: `/system/country/optionList`, method: 'get', params })

// 查询接受中标条件列表
export const acceptConditionListApi = (params) => request({ url: `/web/acceptCondition/list`, method: 'get', params })

// 二维码
export const qrCode = (params) => request({ url: `/common/QrCode`, method: 'get', params, responseType: 'blob' })

// 新增评价服务
export const serviceEvaluationAdd = (data) => request({ url: `/web/serviceEvaluation/add`, method: 'post', data })

// 保存在线比价
export const insertShcwComparePriceApi = (data) => request({ url: `/web/comparePrice/insertShcwComparePrice`, method: 'post', data, loading: true })

// 比价单列表
export const selectShcwComparePriceListApi = (params, data) => request({ url: `/web/comparePrice/selectShcwComparePriceList`, method: 'post', params, data, loading: true })

// 查看比价单
export const selectShcwComparePriceByIdApi = (params) => request({ url: `/web/comparePrice/selectShcwComparePriceById`, method: 'get', params, loading: true })

// 新增会话
export const sessionApi = (data) => request({ url: `/web/session`, method: 'post', data })

// 获取会话数据
export const getInfoListApi = (params, data) => request({ url: `/web/session/getInfoList`, method: 'post', params, data })

// 获取未读会话数据
export const getUnreadInfoListApi = (params, data) => request({ url: `/web/session/getUnreadInfoList`, method: 'post', params, data })

// 获取未读会话数据 (自己)
export const getSendingUnreadInfoListApi = (params, data) => request({ url: `/web/session/getSendingUnreadInfoList`, method: 'post', params, data })

// 查询会话列表
export const getListApi = (params) => request({ url: `/web/session/list`, method: 'get', params })

// 获取当前登录用户未度消息条数
export const getCountSendingUnreadApi = (params) => request({ url: `/web/session/countSendingUnread`, method: 'get', params })

// 删除会话
export const deletePersonApi = (sendingCustomerId) => request({ url: `/web/session/${sendingCustomerId}`, method: 'DELETE' })

// 屏蔽会话
export const blackPersonApi = (sendingCustomerId) => request({ url: `/web/session/${sendingCustomerId}`, method: 'get' })

// 查询公告管理列表
export const noticesListApi = (params) => request({ url: `/web/notices/list`, method: 'get', params })

// 获取公告管理详细信息
export const getNoticeDetailApi = (id) => request({ url: `/web/notices/${id}`, method: 'get' })

// 获取视频详细信息
export const getVideoInfoApi = () => request({ url: `/web/video/getInfo`, method: 'get' })

// 查询推荐新闻列表
export const getNewsListApi = (params) => request({ url: `/web/news/listRecommendation`, method: 'get', params })

// 热门文章(三天)
export const getThreeDayPopularListApi = (params) => request({ url: `/web/article/threeDayPopularList`, method: 'get', params })

// 船员列表
export const getCrewListApi = (params) => request({ url: `/web/crewResume/listRecommendation`, method: 'get', params })

// 查询指定位置广告
export const getAdListApi = () => request({ url: `/web/advertisement/list`, method: 'get' })

// 查询全部广告 列表
export const getAdQueryAllListApi = () => request({ url: `/web/advertisement/queryAll`, method: 'get' })

// 查询指数数据列表
export const getIndexDataApi = (params) => request({ url: `/web/indexData/list`, method: 'get', params })
